﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Best.SmartCms.Domain.Common;

namespace Best.SmartCms.Domain.Common
{
    /// <summary>
    /// 附件
    /// </summary>
    [Table("Attachment")]
    public class Attachment: BaseDomain
    {
        /// <summary>
        /// 存储方式
        /// </summary>
        public int StorageType { get; set; }
        /// <summary>
        /// 文件大小
        /// </summary>
        public long Size { get; set; }
        /// <summary>
        /// 扩展名
        /// </summary>
        [StringLength(50)]
        public string Type { get; set; }

        /// <summary>
        /// 文件名称
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// 原始图片地址
        /// </summary>
        [StringLength(250)]
        public string Url { get; set; }

        /// <summary>
        /// 缩略图Url
        /// </summary>
        [StringLength(250)]
        public string ThumbUrl { get; set; }

        /// <summary>
        /// 存储路径
        /// </summary>
        [StringLength(250)]
        public string StoragePath { get; set; }
        /// <summary>
        /// OSS key
        /// </summary>
        [StringLength(50)]
        public string OssKey { get; set; }
        /// <summary>
        /// 业务表Id
        /// </summary>
        public long SourceId { get; set; }
        /// <summary>
        /// 所属业务
        /// </summary>
        public int SourceType { get; set; }

    }
}